Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 17, 2025

Bumps github.com/zeromicro/go-zero from 1.5.4 to 1.9.3.

Release notes

Sourced from github.com/zeromicro/go-zero's releases.

v1.9.3

We are excited to announce the release of go-zero v1.9.3! This release brings several important enhancements and bug fixes that improve the framework's reliability, performance, and alignment with industry best practices.

🎉 Highlights

  • Consistent Hash Load Balancing: New gRPC load balancer for session affinity
  • gRPC Best Practices: Changed NonBlock default to align with gRPC recommendations
  • Improved Distributed Tracing: Fixed gateway trace header propagation
  • ORM Improvements: Fixed zero value scanning for pointer destinations

✨ New Features

Consistent Hash Balancer Support (#5246)

Contributor: @​zhoushuguang

A new consistent hash load balancer has been added to the zRPC package, enabling session affinity for gRPC services.

Key Features:

  • Hash-based request routing to maintain session affinity
  • Distributes requests based on a hash key from context
  • Minimal request redistribution on node changes
  • Built on go-zero's existing core/hash/ConsistentHash implementation

Usage Example:

// Set hash key in context
ctx := zrpc.SetHashKey(ctx, "user_123")
// Requests with the same key will be routed to the same backend
resp, err := client.SomeMethod(ctx, req)

Configuration:

c := zrpc.RpcClientConf{
    Endpoints: []string{"localhost:8080", "localhost:8081"},
    BalancerName: "consistent_hash",  // Use consistent hash balancer
}

Benefits:

  • Enables stateful service interactions
  • Improves cache hit rates on backend services
  • Reduces session data synchronization overhead
  • Maintains load distribution while supporting affinity

... (truncated)

Commits
  • 75941ae refactor: simplify getValueInterface function (#5280)
  • c706517 fix(orm): properly handle zero value scanning for pointer destinations (#5270)
  • 052de3b chore: fix grammar and typos in comments (#5279)
  • 866613a Update readme-cn.md (#5266)
  • 3d4f6a5 Add company to the user list (#5264)
  • d1d47d0 chore(deps): bump go.mongodb.org/mongo-driver/v2 from 2.3.1 to 2.4.0 (#5262)
  • d6c8768 feat(zrpc): change NonBlock default to true following gRPC best practices (#5...
  • 98423ca fix(goctl): use rest.Serverless for generated integration tests (#5258)
  • 4e52d77 fix(trace): use sync.Once to prevent multiple trace initialization (#5244)
  • 1fc2cfb fix: gateway trace headers 5248 (#5256)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Greptile Summary

  • Upgraded github.com/zeromicro/go-zero from v1.5.4 to v1.9.3, bringing performance improvements, new features (consistent hash load balancing), and bug fixes (ORM zero value handling, trace header propagation)
  • Updated Go version requirement from 1.18 to 1.21 and bumped transitive dependencies (OpenTelemetry v1.14.0→v1.24.0, golang.org/x/sys, color libraries)

Confidence Score: 5/5

  • Safe to merge - dependency upgrade with no breaking API changes affecting this example
  • The upgrade is a standard dependency update from Dependabot. The zaplog example only uses basic logx APIs (logx.Infow, logx.Field, logx.SetWriter) which are stable interfaces. The breaking changes in v1.9.3 (gRPC NonBlock default) don't affect this logging example. All transitive dependency updates are minor/patch versions.
  • No files require special attention

Important Files Changed

Filename Overview
logx/zaplog/go.mod Bumped go-zero from v1.5.4 to v1.9.3, upgraded Go version from 1.18 to 1.21, updated transitive dependencies

Sequence Diagram

sequenceDiagram
    participant App
    participant logx
    participant zapx
    participant zap
    App->>zapx: "NewZapWriter()"
    zapx-->>App: "writer"
    App->>logx: "SetWriter(writer)"
    App->>logx: "Infow/Errorw/Sloww()"
    logx->>zapx: "write logs"
    zapx->>zap: "format and output"
Loading

Bumps [github.com/zeromicro/go-zero](https://github.com/zeromicro/go-zero) from 1.5.4 to 1.9.3.
- [Release notes](https://github.com/zeromicro/go-zero/releases)
- [Commits](zeromicro/go-zero@v1.5.4...v1.9.3)

---
updated-dependencies:
- dependency-name: github.com/zeromicro/go-zero
  dependency-version: 1.9.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Nov 17, 2025
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant